package com.rustic.server.dto;

import cn.hutool.core.bean.BeanUtil;
import cn.xy.commons.enums.DataStatus;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.rustic.server.po.RusticAdmin;
import com.rustic.server.dto.base.RusticAdminBaseDTO;
import java.util.Date;

/**
 * 表[rustic_admin]对应AddDTO类
 *
 * @author auto
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class RusticAdminAddDTO extends RusticAdminBaseDTO {
    /**
     * 乡村id
     */
    @ApiModelProperty(value = "乡村id", dataType = "int")
    private int rusticId;

    /**
     * 管理员id
     */
    @ApiModelProperty(value = "管理员id", dataType = "int")
    private int adminId;

    /**
     * 角色id
     */
    @ApiModelProperty(value = "角色id", dataType = "int")
    private int roleId;


    public RusticAdmin toRusticAdmin() {
        RusticAdmin rusticAdmin = new RusticAdmin();
        BeanUtil.copyProperties(this, rusticAdmin);
        return rusticAdmin;
    }
}
